// ml:run = $bin < input
#include <iostream>
#include <cstring>

int const maxn = 10007;
int a[maxn];
bool vis[maxn];
int n, k;

void init()
{
    std::memset(vis, 0, sizeof(vis));
}

int main()
{
    std::ios_base::sync_with_stdio(false);
    int T; std::cin >> T;
    for (int ti = 1; ti <= T; ti++) {
        std::cout << "Case #" << ti << ":";
        std::cin >> n >> k;
        init();
        int t = k;
        for (int i = 1; i <= t; i++) {
            a[i] = 2 * i;
            vis[2 * i] = true;
        }
        int p = 1;
        for (int i = t + 1; i <= n; i++) {
            while (vis[p]) p++;
            a[i] = p++;
        }
        for (int i = 1; i <= n; i++)
            std::cout << " " << a[i];
        std::cout << "\n";
    }
}

